package com.ruoyi.business.domain;

import com.mybatisflex.annotation.*;
import com.ruoyi.common.annotation.IdToName;
import com.ruoyi.common.translate.constant.Translate;
import lombok.*;

import javax.validation.constraints.*;

import com.ruoyi.common.core.domain.BaseEntity;

import java.time.LocalDate;

/**
 * 数据实体 : 工程项目信息表
 * @Author : ljq
 * @Created : 2025/10/1
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("t_project")
public class Project extends BaseEntity {


    @Id(keyType = KeyType.Auto)
    private Long id;

    /// 项目名称
    @Size(min = 0, max = 100, message = "项目名称长度不能超过100个字符")
    private String name;

    /// 用人单位
    @IdToName(type = Translate.Type.DEPT, async = false, nameField = "employerName", cacheSeconds = 1)
    private Long employerId;
    @Column(ignore = true)
    private String employerName;

    /// 项目地址
    @Size(min = 0, max = 200, message = "项目地址长度不能超过200个字符")
    private String address;

    /// 开工日期
    private LocalDate startDate;

    /// 竣工日期
    private LocalDate endDate;

    /// 项目经理
    @Size(min = 0, max = 50, message = "项目经理长度不能超过50个字符")
    private String projectManager;

    /// 项目经理电话
    @Size(min = 0, max = 11, message = "项目经理电话长度不能超过11个字符")
    private String managerPhone;

    /// 项目总预算
    private Double totalBudget;

    /// 状态：1-进行中，2-已完工，0-停工
    @Size(min = 0, max = 1, message = "状态：1-进行中，2-已完工，0-停工(status)长度不能超过1个字符")
    private String status;


    ///  总投入
    private Double totalInvest;

    ///  银行卡号
    private Long bankCardId;



}